<!DOCTYPE html>
<html>

<head>
    <title>work100 - login</title>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="${ctxPath}/assets/common/layui/css/layui.css"/>
    <link rel="stylesheet" href="${ctxPath}/assets/common/css/login.css" media="all">
    <link rel="stylesheet" href="${ctxPath}/assets/common/css/retrieve.css" media="all">
    <style>
        body {
            background-image: url("${ctxPath}/assets/common/images/bg_login2.svg");
            background-position: center 110px;
            background-repeat: no-repeat;
            background-size: 100%;
            background-color: #f0f2f5;
        }

        .login-header {
            color: rgba(0, 0, 0, .85) !important;
        }

        .login-footer {
            color: rgba(0, 0, 0, 0.7) !important;
        }

        .login-footer a {
            color: rgba(0, 0, 0, 0.7) !important;
        }

        .login-footer a:hover {
            color: rgba(0, 0, 0, 0.4) !important;
        }
    </style>
    <script>
        if (window != top)
            top.location.replace(location.href);
    </script>
</head>

<body>
<div class="login-wrapper">
    <div class="login-header">
        <img src="${ctxPath}/assets/expand/images/logo.png">
    </div>
    <div class="login-body">
        <div class="layui-card">
            <div class="layui-card-header">
                <i class="layui-icon layui-icon-engine"></i>&nbsp;&nbsp;用户登录
            </div>
            <form class="layui-card-body layui-form layui-form-pane" action="${ctxPath}/login" method="post">
                <div class="layui-form-item">
                    <label class="layui-form-label">账号</label>
                    <div class="layui-input-block">
                        <input name="username" placeholder="请输入账号" type="text" lay-verify="required" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">密码</label>
                    <div class="layui-input-block">
                        <input name="password"placeholder="请输入密码"  type="password" lay-verify="required" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item" pane="">
                    <label class="layui-form-label" lay-tips="7天内免登陆">记住我</label>
                    <div class="layui-input-block">
                        <input type="radio" name="remember" value="on" title="是">
                        <input type="radio" name="remember" value="off" title="否" checked="">
                    </div>
                </div>
                <div class="layui-form-item">
                    <a href="javascript:;" class="layui-link" id="reg">帐号注册</a>
                    <a href="javascript:;" class="layui-link pull-right" id="retrieve">忘记密码？</a>
                </div>
                <div class="layui-form-item">
                    <button lay-filter="login-submit" class="layui-btn layui-btn-fluid" lay-submit>登 录</button>
                </div>
                <div class="layui-form-item login-other">
                    <label>第三方登录</label>
                    <a href="/oauth/render/qq"><i class="layui-icon layui-icon-login-qq"></i></a>
                    <a href="/oauth/render/gitee"><img style="height: 28px;width: 28px" src="/assets/expand/images/git.png"></a>
                </div>
            </form>
        </div>
    </div>
    <div id="msform" hidden>
        <!-- progressbar -->
        <ul id="progressbar">
            <li class="active" style="color: #0C0C0C">输入邮箱</li>
            <li style="color: #0C0C0C">验证邮箱</li>
            <li style="color: #0C0C0C">修改密码</li>
        </ul>
        <!-- fieldsets -->
        <fieldset>
            <h2 class="fs-title">请输入账号绑定的邮箱地址</h2>
            <input type="text" id="email" placeholder="请输入邮箱地址" />
            <input type="button" id="cancel" class="action-button" value="取消" />
            <input type="button" name="next" class="next action-button" value="下一步" />
        </fieldset>
        <fieldset>
            <h2 class="fs-title">验证邮箱</h2>
            <input type="text" id="emailCode" placeholder="请输入验证码" />
            <input style="width: 90%;" type="button" id="retrievePassword" class="action-button" value="点击获取验证码" />
            <br>
            <input type="button" name="previous" class="previous action-button" value="上一步" />
            <input type="button" name="next" class="nextTo action-button" value="下一步" />
        </fieldset>
        <fieldset>
            <h2 class="fs-title">重置密码</h2>
            <h1 class="fs-subtitle">新密码已发送到邮箱，请登录邮箱查看</br>成功登录后请立即修改密码</h1>
            <input type="button" id="return" class="action-button" value="返回首页" />
        </fieldset>
    </div>
    <div class="login-footer">
        <p><a href="http://www.beian.miit.gov.cn"  target="_blank">豫ICP备18035176号-1</a><br></p>
        <p>© 2019 work100.com.cn 版权所有</a></p>
    </div>
</div>

@/* 加入contextPath属性和session超时的配置 */
<script type="text/javascript">
    var Feng = {
        ctxPath: "",
        addCtx: function (ctx) {
            if (this.ctxPath === "") {
                this.ctxPath = ctx;
            }
        }
    };
    Feng.addCtx("${ctxPath}");
</script>
<script type="text/javascript" src="${ctxPath}/assets/common/layui/layui.js"></script>
<script type="text/javascript" src="${ctxPath}/assets/common/js/common.js"></script>
<script type="text/javascript" src="${ctxPath}/assets/common/js/login.js"></script>
<script>
    layui.use(['layer', 'form'], function () {
        var $ = layui.jquery;
        var layer = layui.layer;
        var form = layui.form;
        var errorMsg = "${tips!}";
        if (errorMsg) {
            layui.layer.msg(errorMsg, {icon: 5, anim: 6});
        }
        // 表单提交
        form.on('submit(login-submit)', function (obj) {
            return true;
        });
        var errorMsg = "${tips!}";
        if (errorMsg) {
            layui.layer.msg(errorMsg, {icon: 5, anim: 6});
        }

    });
</script>
</body>
</html>
